import { http } from '@/apis/http';
import type { ApiResponse } from '@/apis/types/Response';
import type { sql, webUri, basic, health, address } from '@/apis/types/Monitor';

export const userMonitorApi = {
    /**
     * 获取监控数据
     */
    getSqlMonitor() {
        return http.get<ApiResponse<sql>>('/user/monitor/sql');
    },
    getWebUriMonitor() {
        return http.get<ApiResponse<webUri>>('/user/monitor/webUri');
    },
    getHealthMonitor() {
        return http.get<ApiResponse<health>>('/user/monitor/health');
    },
    getBasicMonitor() {
        return http.get<ApiResponse<basic>>('/user/monitor/basic');
    },
}

export const contentMonitorApi = {
    getSqlMonitor() {
        return http.get<ApiResponse<sql>>('/content/monitor/sql');
    },
    getWebUriMonitor() {
        return http.get<ApiResponse<webUri>>('/content/monitor/webUri');
    },
    getHealthMonitor() {
        return http.get<ApiResponse<health>>('/content/monitor/health');
    },
}

export const abilityMonitorApi = {
    getSqlMonitor() {
        return http.get<ApiResponse<sql>>('/ability/monitor/sql');
    },
    getWebUriMonitor() {
        return http.get<ApiResponse<webUri>>('/ability/monitor/webUri');
    },
    getHealthMonitor() {
        return http.get<ApiResponse<health>>('/ability/monitor/health');
    },
    getAddress() {
        return http.get<ApiResponse<address>>('/ability/monitor/address');
    },
}
